home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_03
/
saks
/
decouple.cpp
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1995-01-04
|
380 b
|
31 lines
Listing 5 - Decoupling the class hierarchy structure from
application code using a member typedef.
//
// class library code
//
class B
{
public:
void f();
...
};
class D : public B
{
public:
typedef B inherited;
void f();
};
//
// library user's code
//
void g(D *pd)
{
pd->inherited::f();
...
}